<template>
<el-select :value="value" placeholder="请选择类型" @change="onChange" clearable>
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>
</template>

<script>
export default {
	name: 'TypeSelect',
    model: {
        props: 'value',
        event: 'change',
    },
    props: {
        value: {
            type: [Number, String],
        },
    },
    computed: {
        options(){
            return this.$store.state.typeSelectOptions;
        }
    },
    methods: {
        onChange(e){
            this.$emit('change', e);
        }
    }
};
</script>